#ifndef PREFERENCESUTIL_H
#define PREFERENCESUTIL_H

#include <Preferences.h>
#include "led.h"

#define NAMESPSCE_KEY "catcon"

#define RED_KEY "red"
#define GREEN_KEY "green"
#define BLUE_KEY "blue"
#define LIGHT_KEY "light"
#define COLORDATA_KEY "colorData"
#define CHIPLET_KEY "chiplet"
#define LEDMODE_KEY "ledMode"
#define LEDPIXELS_KEY "ledPixels"
#define LEDAE_KEY "ledAE"

class PreferencesUtil
{

public:
    PreferencesUtil();
    ~PreferencesUtil();
    uint8_t getRedData();
    uint8_t getGreenData();
    uint8_t getBlueData();
    uint8_t getLightData();
    String getColorData();
    led_chipLet getChipLet();
    led_mode getLedMode();
    int getLedPixels();
    void setLedMode(led_mode mode);
    void setColorData(String color);

    void setRedData(uint8_t num);
    void setGreenData(uint8_t num);
    void setBlueData(uint8_t num);
    void setLightData(uint8_t num);
    void setChipLet(led_chipLet chiplet);
    void setLedPixels(int pixels);

private:
    Preferences prefs;
};

#endif // !